/**
  * @name 分类组件
  * @description: 
  * @param datas {Object} 数据
  * @return 
  */

<template>
	<van-grid :column-num="5" :border="false">
		<van-grid-item v-for="item of datas.category" :key="item.mallCategoryId" @click="toList(item.mallCategoryId)">
			<van-image :src="filterImageUrl(item.image)" />
			<span class="text">{{item.mallCategoryName}}</span>
		</van-grid-item>
	</van-grid>
</template>

<script>
	export default {
		props: {
			datas: {
				type: Object,
				required: true
			}
		},
		methods:{
			toList(id){
				this.$router.push({path:"/list",query:{id:id}})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "css/pages/home/category.scss";
</style>
